<%@ page language="java" pageEncoding="UTF-8"%>
<%@ page import="java.util.*" %>
<%@ page isELIgnored="false" %> 

<%@ page import="net.ssta.core.db.RecordSet"%>
<%@ page import="net.ssta.core.db.Record"%>
<%@ page import="net.ssta.core.db.PagingInfo"%>

<%
	String path = request.getContextPath();
	//分页参数
    PagingInfo pagingInfo =(PagingInfo) request.getAttribute("pagingInfo");
    
	RecordSet rs=(RecordSet)request.getAttribute("RECORDSET");
	if(rs==null){rs=new RecordSet();}
	
	 int pageno = pagingInfo.getCurrentPageNo();
	 Record  searRecord=(Record)request.getAttribute("searchData");
	 if(searRecord==null){
		 searRecord=new Record();
	 }
%>


 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>


<link type="text/css" rel="stylesheet" href="<%=path %>/includes/css/commonStyle.css"/> 
<link type="text/css" rel="stylesheet" href="<%=path %>/includes/styleBase/css/styleBase.css"/>
<link type="text/css" rel="stylesheet" href="<%=path %>/includes/styleBase/css/ostable.css" />
<link rel="stylesheet" href="<%=path %>/includes/lhgdialog/lhgdialog.css" />


<script type='text/javascript' src="<%=path %>/includes/js/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/includes/styleBase/js/style.js"></script>
<script type="text/javascript" src="<%=path %>/includes/DatePicker/WdatePicker.js"></script>


<script type="text/javascript" src="<%=path %>/includes/lhgdialog/lhgcore.min.js"></script>
<script type="text/javascript" src="<%=path %>/includes/lhgdialog/lhgdialog.js"></script>



<title>注册用户管理</title>
<script>
function popUpgrade(userId,type){
  if("0"==type){
    popUnit(userId);
  }else{
     popExpert(userId);
  }
}

function popUnit(userId)
{
	var dlg = new J.ui.dialog(
	{ id:'handledemand',
         title:'机构列表',
         range:true,
         btns:true,
         page:'<%=path%>/back/userManager?method=unitList&userId='+userId,
         width:800,
         height:500,
         windowObj:window
       });
	dlg.ShowDialog();
}


function popExpert(userId)
{
	var dlg = new J.ui.dialog(
	{ id:'handledemand',
         title:'专家列表',
         range:true,
         btns:true,
         page:'<%=path%>/back/userManager?method=expertList&userId='+userId,
         width:800,
         height:500,
         windowObj:window
       });
	dlg.ShowDialog();
}

//跳转
function reloadPage() 
{
	_goPage(<%=pageno%>);
}	

function popMark(obj){
  var p=$(obj).attr("mark");
  var str = p.replace(/\r\n/gi, "<br/>");
  str="<div style='margin:10px;'>"+str+"</div>";
  var dlg = new J.ui.dialog(
	{ id:'handledemand',
         title:'申请说明',
         range:true,
         btns:false,
         html:str,
         width:400,
         height:200,
         windowObj:window
       });
	dlg.ShowDialog();
 
}
	
</script>
</head>
<body>
 
	<div class="titleDiv">
  <table width="100%" cellpadding="0" cellspacing="0" border="0" style="text-align:left;">
    <tr>
      <td class="box_top_left">&nbsp;</td>
      <td class="box_top_center">用户升级申请查询</td>
      <td class="box_top_right">&nbsp;</td>
    </tr>
  </table>
</div>

<form name="_sForm" action="<%=path %>/back/userManager?method=applyList" method="post">
	<div class="infoDiv">
	  <table border="0" cellpadding="0" cellspacing="0" class="trHeightTable">
	    <tr>
	      <td class="leftTipArea">用户名：</td>
	      <td><input  name="search_LOGINNAME" class="textInput" style="width:120px;" value="<%=searRecord.getString("LOGINNAME","") %>"/></td>
	    
	      <td width="10px">&nbsp;</td>
	      
		   <td class="leftTipArea">真实姓名：</td>
	      <td><input  name="search_FULLNAME" class="textInput" style="width:120px;" value="<%=searRecord.getString("FULLNAME","") %>"/></td>
	   
	  	 <td width="10px">&nbsp;</td>
	     <td class="leftTipArea">申请类型：</td>
	     <td><select name="search_FKTYPE">
	             <option value=""  <%="".equals(searRecord.getString("FKTYPE",""))?"selected":"" %>>————</option>
	             <option value="0" <%="0".equals(searRecord.getString("FKTYPE",""))?"selected":"" %>>机构用户</option>
				 <option value="1" <%="1".equals(searRecord.getString("FKTYPE",""))?"selected":"" %>>专家用户</option>
		</select></td>
	   
	   
	     <td width="30px">&nbsp;</td>
	      <td>
	      	<a href="javascript:document._sForm.submit();" class="imgButton" ><span>查询</span></a>
	      </td>
	    </tr>
	  </table>
	</div>
</form>

<div class="titleDiv">
  <table width="100%" cellpadding="0" cellspacing="0" border="0" style="text-align:left;">
    <tr>
      <td class="box_top_left" width="2">&nbsp;</td>
      <td class="box_top_center">查询结果列表</td>
      <td class="box_top_right" width="2">&nbsp;</td>
    </tr>
  </table>
</div>

<div class="contentBox">
    <table class="osTable" cellpadding="0" cellspacing="0" border="0">
      <thead>
        <tr >
          <th  width="10%" >用户名</th>
          <th  width="10%" >真实姓名</th>
          <th  width="10%" >联系电话</th>
          <th  width="10%" >Email</th>
          <th  width="10%">申请类型</th>
          <th  width="15%">申请名称</th>
          <th  width="25%">指定关联对象</th>
          <th  width="15%">操作</th>
        </tr>
      </thead>
      <tbody>
        <%
           int i=0;
           for(i=0;i<rs.size();i++){
        	   Record r=rs.get(i);
        %>
	 
	 <tr>
	    <td><%=r.getString("LOGINNAME","") %>&nbsp;</td>
	    <td><%=r.getString("USERNAME","") %>&nbsp;</td>
	    <td><%=r.getString("TELEPHONE","") %>&nbsp;</td>
	    <td><%=r.getString("EMAIL","") %>&nbsp;</td>
	    <td><%="0".equals(r.getString("FKTYPE"))?"机构用户":"专家用户" %>&nbsp;</td>
	    <td mark="<%=r.getString("MARK")%>" onclick="popMark(this)"><A href="#3"><%=r.getString("APPLYNAME","") %></A>&nbsp;</td>
	    <td><%="0".equals(r.getString("FKTYPE"))?r.getString("UNITNAME",""):r.getString("EXPERTNAME","") %>&nbsp;</td>
	    <td><A href="javascript:popUpgrade('<%=r.getString("USERID") %>','<%=r.getString("FKTYPE") %>')"><%="0".equals(r.getString("FKTYPE"))?"关联机构":"关联专家" %></A></td>
	 </tr>
	 <%} for(;i<10;i++){%>
	<tr>
		<td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	    <td>&nbsp;</td>
	 </tr>
	 <%} %>
      </tbody>
    </table>
	<div class="navDiv">
    <div class="navLeftDiv">
       &nbsp;
    </div>
    
    <div class="navRightDiv">  
    	 <jsp:include flush="true" page="/common/paging.jsp"></jsp:include>
	</div>
</div>
</div>
</body> 
</html>